<h1>评论列表</h1>
<DIV class=ListContent>
<%@comments.each_with_index do |comment,i|%>
<DIV class=DisplayItem>
    <DIV class=Icon>
    <%if comment.reader.pic_url && comment.reader.pic_url!=""%>
    <%= image_tag(comment.reader.pic_url, :size => "48x48")%>
    <%else%>
    <%= image_tag('default_head.gif', :size => "48x48")%>
    <%end%>
        <%if check_admin%>
        <br><%=link_to '删除此评论' ,{:action => 'destroy',:id => comment}, :confirm => '确认删除?', :post => true%>
        <%end%>
    </DIV>
	<DIV class=Content>
		<DIV class=F><%=h comment.reader.reader_name%>在&nbsp;<SPAN class=Date><%=h distance_of_time_in_words(comment.updated_at,Time.now)%></SPAN>&nbsp;之前发言：(<%=comment.subcomments.length%>)</DIV>
		<DIV class=F><SPAN class=Title><%=h comment.title%></SPAN></DIV>
		<DIV class=HRDisplay></DIV>
		<DIV class=F><SPAN><A class=ActionLink
			onclick="collapse(this, 'collection_detail_<%=comment.object_id%>');; return false;"
			href="#">»</A> </SPAN></DIV>
		<DIV id=collection_detail_<%=comment.object_id%> style="DISPLAY: none">
			<DIV class=F><SPAN class=ListDescription><%=comment.content%></SPAN></DIV>
			<DIV class=F><SPAN class=ListDate>- <%=h date_format(comment.updated_at)%></SPAN></DIV>
			<DIV class=F><SPAN class=ListDate>- <%=link_to reply_level(comment.subcomments.length) ,{:action => 'new_subcomment',:id => comment}, :post => true%></SPAN></DIV>
			<%comment.subcomments.each_with_index do|subcomment,i|%>
			---------------------------------------------
			 <DIV class=F><SPAN class=ListDate><%=i+1%>楼:</SPAN></DIV>
			 <DIV class=F><SPAN class=ListDate><%=subcomment.content%></SPAN></DIV>
			 <DIV class=F><SPAN class=ListDate>- <%=h subcomment.author%></SPAN></DIV>
			 <DIV class=F><SPAN class=ListDate>- <%=h date_format(subcomment.updated_at)%></SPAN></DIV>
			<%end%>
		</DIV>
	</DIV>
	<DIV class=Clear></DIV>
</DIV>
<%end%>
</DIV>
<%=render :partial => 'shared/paginate' , :object => @comments_pages%>